<template>
	<view>
		<collect-item v-for="(item,index) in data"
		:key=item.id
		:content="item.content"
		:form="item.form"
		:mid="item.id"
		:mytype="1"
		@delete="data.splice(index,1)"></collect-item>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import db from '../../util/db';
import {onShow} from "@dcloudio/uni-app";
const data = ref("");
onShow(async ()=>{
	data.value = await db.selectCollect();
	console.log(data.value);
	data.value.reverse();
	await db.closeDatabase();
})
</script>

<style>

</style>
